<template>
    <div id="cesiumContainer"></div>
</template>
<script lang="ts" setup>
import { ACCESS_TOKEN, TILE_SET } from '@/utils/constant';
import * as Cesium from 'cesium';
Cesium.Ion.defaultAccessToken = ACCESS_TOKEN;
const init = async () => {
    const viewer = new Cesium.Viewer('cesiumContainer');
    const tileset = await Cesium.Cesium3DTileset.fromUrl(TILE_SET);

    viewer.scene.primitives.add(tileset);

    viewer.zoomTo(tileset);
    // 3dtiles调试面板
    viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
};
onMounted(() => {
    init();
});
</script>
<style lang="scss" scoped></style>
